{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from math import pi, sin, cos, tan\n",
    "from matplotlib import pyplot as plt\n",
    "import pickle\n",
    "import numpy as np\n",
    "\n",
    "%matplotlib inline\n",
    "\n",
    "\n",
    "\n",
    "class Car:\n",
    "    \n",
    "    fps       = 16.0     # frames per second\n",
    "    dt        = 1.0 / fps # time per frame\n",
    "    max_steer = 30.0      # degrees\n",
    "    L         = 4.0       # meters\n",
    "    max_a     = 2 * 9.8   # m/s/s\n",
    "    max_brake = 5 * 9.8   \n",
    "    \n",
    "    def __init__(self):\n",
    "        # state variables\n",
    "        self.x     = 0.0\n",
    "        self.y     = 0.0\n",
    "        self.theta = 0.0  # east\n",
    "        self.speed = 0.0\n",
    "        self.omega = 0.0\n",
    "        self.t     = 0.0\n",
    "        \n",
    "        # driver controllable\n",
    "        self.a_y   = 0.0\n",
    "        self.alpha = 0.0\n",
    "        \n",
    "        # state history\n",
    "        self.history = [(0,0,0,0,0,0,0,0)]\n",
    "        \n",
    "        self.braking = False\n",
    "        self.backing = False\n",
    "        \n",
    "    def reverse(self):\n",
    "        self.a_y = 0.0\n",
    "        self.backing = True\n",
    "        \n",
    "    def forward(self):\n",
    "        self.a_y = 0.0\n",
    "        self.backing = False\n",
    "\n",
    "    def steer(self, angle):\n",
    "        assert -self.max_steer <= angle <= self.max_steer\n",
    "        self.alpha = angle * pi / 180\n",
    "    \n",
    "    def gas(self, amount):\n",
    "        assert -1.0 <= amount <= 1.0\n",
    "        self.a_y = amount * self.max_a\n",
    "        \n",
    "#     def brake(self, amount):\n",
    "#         assert 0.0 <= amount <= 1.0\n",
    "#         sgn = -1.0\n",
    "#         if self.speed < 0.0:\n",
    "#             sgn = 1.0\n",
    "#         self.braking = True\n",
    "#         self.a_y = sgn * amount * self.max_brake\n",
    "    \n",
    "    def go(self, duration):\n",
    "        num_frames = int(duration / self.dt)\n",
    "        for i in range(num_frames):\n",
    "            snapshot = (\n",
    "                self.t+self.dt,    # \n",
    "                self.a_y,  # \n",
    "                self.speed,#\n",
    "                self.x,    \n",
    "                self.y,    \n",
    "                self.theta,\n",
    "                self.omega, #\n",
    "                self.alpha,#\n",
    "            )\n",
    "            self.history.append(snapshot)\n",
    "            self.increment_frame()\n",
    "    \n",
    "    def increment_frame(self):\n",
    "        new_t      = self.t + self.dt\n",
    "        new_a_y    = self.a_y\n",
    "        new_speed  = self.speed + self.a_y * self.dt\n",
    "        if self.backing:\n",
    "            new_speed  = self.speed - self.a_y * self.dt \n",
    "        new_alpha  = self.alpha\n",
    "        new_omega  = self.speed / self.L * tan(self.alpha)\n",
    "        new_theta  = (self.theta + self.omega * self.dt) % (2*pi)\n",
    "        \n",
    "        # intermediate steps for x, y\n",
    "        distance   = self.speed * self.dt\n",
    "        dx         = distance * cos(self.theta)\n",
    "        dy         = distance * sin(self.theta)\n",
    "        \n",
    "        new_x      = self.x + dx\n",
    "        new_y      = self.y + dy\n",
    "        \n",
    "        self.t     = new_t\n",
    "        self.a_y   = new_a_y\n",
    "        self.speed = new_speed\n",
    "        self.alpha = new_alpha\n",
    "        self.omega = new_omega\n",
    "        self.theta = new_theta\n",
    "        self.x     = new_x\n",
    "        self.y     = new_y\n",
    "        \n",
    "    def show_history(self, increment=10):\n",
    "        t, a, s, x, y, theta, omega, alpha = np.array(car.history).T\n",
    "        plt.scatter(x[::increment],y[::increment])\n",
    "        \n",
    "    def show_history2(self, inc=10):\n",
    "        t, a, s, x, y, theta, omega, alpha = np.array(car.history).T\n",
    "        u = np.cos(theta)\n",
    "        v = np.sin(theta)\n",
    "#         m = np.hypot(u,v)\n",
    "        Q = plt.quiver(x[::inc],y[::inc],u[::inc],v[::inc], \n",
    "                       units='x', pivot='tip')\n",
    "        qk = plt.quiverkey(Q, 0.9, 0.9, 2, r'$1 \\frac{m}{s}', \n",
    "                           labelpos='E', coordinates='figure' )\n",
    "        \n",
    "        \n",
    "    def get_displacements(self):\n",
    "        disp = 0\n",
    "        displacements = [disp]\n",
    "        t, a, s, x, y, theta, omega, alpha = np.array(car.history).T\n",
    "        last_t = 0.0\n",
    "        for ts, speed in zip(t[1:], s[1:] ):\n",
    "            dt = ts - last_t\n",
    "            dD = speed * dt\n",
    "            disp += dD\n",
    "            displacements.append(disp)\n",
    "            last_t = ts\n",
    "        return displacements\n",
    "        \n",
    "        \n",
    "    def save_trajectory(self, filename):\n",
    "        t, a, s, x, y, theta, omega, alpha = np.array(car.history).T\n",
    "        displacements = self.get_displacements()\n",
    "        assert(len(displacements) == len(t) )\n",
    "        trajectory = zip(t, displacements, omega, a)\n",
    "        with open(filename, 'wb') as f:\n",
    "            pickle.dump(trajectory, f)\n",
    "        print(\"saved trajectory to\", filename)\n",
    "            "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD8CAYAAACfF6SlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3XlcVXX++PHXh1VEFBBQRBFZVFzQ\nQHPBBRUZF26pY6mllbmko02bqWVfy2/TZItlWX1/2V7TtH2/zVhTmWbauKSlToMLZuaW4C4gbsjy\n/v0B3hG5LHqBy+W+n4/HeXDPOe97Pu9zxTfnfs45n2NEBKWUUq7FzdEJKKWUqpgxxssYM8oY07ia\nthehxV8ppeo4EbkI3AycMMasMMbcbYyJuJZtGWOmA18b7fZRSqlrY4yZCXjWUnNtgWlXLNsBfF4y\nbRKRwoo2YIzxA34FLFr8lVLqGhljcoFGjs6jxHHgKeBFEcm3FWCM8QUygJu0+Cul1DUyxrwONKil\n5oKA312xLB9YDfwD+IeI7KtsI8aYG4D/0uKvlFJOwBjzHHAfcAL4guKunhUiknsN24r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QqStVLOraPcpjDhw+z\nefNmIiMjadOmDQ0bNrSuc3d315O5StUBWvxVtQsJCeH5559n9erVAISGhhIZGWlzat68uc3n9iql\napYWf1VtCgsL2b9/P+np6XTp0sVa/A8fPszhw4etI3YCtGjRggcffJCpU6eW+maglKodWvzVVSss\nLCQ9Pb3UtHPnTnbv3s2FCxcqfG9ERARz5szhjjvu0Mc1KuVAWvzVVcvJySn3UYre3t60a9eO2NhY\nVq9ezbFjxY91btu2LQ8//DC33HKLXuGjVB2gxV9dtcDAQNq2bUtgYCCxsbGlpoiICNzd3Tl9+jTB\nwcF06tSJRx55hNGjR+uJXqXqEC3+6pr8/PPPFa7ft28fH3/8MRaLRU/oKlUHafFX1+y7777j+++/\np23btrRr147o6Gi8vb0B6NKlC126dHFwhkqp8mjxV9esR48e/OEPf2Dnzp1A8aMaIyIirH8M2rVr\nZ30dFhamQzUrVYdo8VdVVlBQwIEDB9izZw979uzhl19+KXXytqioiL1797J3717r+D4pKSnMnj2b\nsLAwR6WtlLJBi78q15YtW3j33XethX7fvn0UFBRU+j53d3duvvlmZs+eTdeuXWshU6XU1dLir8q1\nd+9eXnzxxVLLGjRoQFRUFNHR0cTExODr68uCBQuA4gexTJ48mfvuu482bdo4ImWlVBVp8VflSkhI\nYNasWcTExFiLfVhYWKmrd1566SWaNm3K3XffzYwZMwgKCnJgxkqpqtLir8oVGRnJM888w9tvv82e\nPXto0KABjRs3pkmTJtaYrl27cvDgQR2iQSkno8VfVSo+Pp5u3bqRn58PQFhYGJ06daJjx4506tQJ\nLy8vOnToQKNGjRycqVKqquwq/saYQOAjIALYD9wsIlk24gqBbSWzB0XkBnvaVTVHRDh27Bj79++3\nTgcOHCAwMJCjR48CkJGRQUZGBl9//bX1ff369WPRokV061bpMOJKqTrA3iP/ucAqEVlojJlbMj/H\nRtx5EdHLPuqoRYsW8c0331gL/fnz56v0Pg8PD26++Wbuu+8+LfpKORl7i/+NQFLJ63eANdgu/qoO\n27p1a6nn7hpjCAsLIyIig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p1Uyb48DKTUbkb2qWh/RGSZiMwD5hljHgJmAo/WaoJXqbL9KYmZBxQA79dmbteiKvvj5Gw9ZadG\naplTFH8RSS5vnTFmOvBpSbH/wRhTRPG4GMdrK7+rVdH+XM4Y8xrFfct1Vnn7YozpDLQB/l3y1KiW\nwFZjzPUicqQWU7wqVf23Af4KfEEdL/6V7Y8x5nYgFRhUlw+YLrmKfx9ndQhoddl8SyCzJhqqD90+\nfwcGAhhj2gJeOPEAT8aY0MtmR1J8EsvpiMg2EQkRkQgRiaD4lzq+Lhf+yhhjYi6bvQHY5ahcqoMx\nZggwB7hBRM45Oh8FwI9AjDGmjTHGCxgLfFYTDTnFkX8l3gTeNMZsBy4CtzvDEUwFnjbGdKX4q95+\n4C7HpqMus9AY0w4oonjE2WkOzsdeLwHewMqSb2cbRcRp98kYMxJYAgQDXxhjfhKR3zk4rasiIgXG\nmJnA14A78KaI7KiJtvQOX6WUckH1odtHKaXUVdLir5RSLkiLv1JKuSAt/kop5YK0+CullAvS4q+U\nUi5Ii79SSrkgLf5KKeWC/j/Uz8x2p5cvnwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fbdeb5836d8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "car = Car()\n",
    "\n",
    "\n",
    "car.gas(-0.1)\n",
    "car.steer(0.0)\n",
    "car.go(1.0)\n",
    "\n",
    "car.gas(0.0)\n",
    "car.steer(-car.max_steer)\n",
    "car.go(1.0)\n",
    "\n",
    "car.steer(car.max_steer)\n",
    "car.go(1.0)\n",
    "\n",
    "car.steer(0.0)\n",
    "car.go(0.2)\n",
    "\n",
    "car.gas(0.15)\n",
    "car.go(2.0)\n",
    "\n",
    "car.gas(0.0)\n",
    "car.go(0.2)\n",
    "\n",
    "\n",
    "car.gas(-0.5)\n",
    "car.go(0.41)\n",
    "\n",
    "car.show_history2(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "saved trajectory to parallel_park.pickle\n"
     ]
    }
   ],
   "source": [
    "car.save_trajectory(\"parallel_park.pickle\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
